#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>

int main()
{
    pid_t pid = fork();
    if(pid == 0)
    {
        printf("子进程: PID = %d\n",getpid());
        exit(0);
    }
    else
    {
        printf("父进程: PID = %d\n",getpid());
        sleep(5);
        printf("父进程结束，回收僵尸子进程\n");
    }
    return 0;
}